gtk4.git
7 years agocontainer: Remove gtk_container_queue_resize_handler()
Benjamin Otte [Tue, 10 Apr 2018 20:08:10 +0000 (22:08 +0200)]
container: Remove gtk_container_queue_resize_handler()

It's the same as gtk_container_maybe_start_idle_sizer()

7 years agocontainer: Use maybe_start_idle_sizer()
Benjamin Otte [Tue, 10 Apr 2018 20:07:36 +0000 (22:07 +0200)]
container: Use maybe_start_idle_sizer()

That way, we don't accidentally start an idle sizer for unrealized
widgets.

7 years agowindow: Don't queue resize handler
Benjamin Otte [Tue, 10 Apr 2018 20:02:31 +0000 (22:02 +0200)]
window: Don't queue resize handler

It's not needed, because the queue_allocate() call right above it does
this work.

7 years agowidget: Don't queue resize handler twice
Benjamin Otte [Tue, 10 Apr 2018 20:01:18 +0000 (22:01 +0200)]
widget: Don't queue resize handler twice

We already queue it when we set_alloc_needed(), so there's no need to do
it again.

7 years agocontainer: Don't store the resize clock
Benjamin Otte [Tue, 10 Apr 2018 19:45:09 +0000 (21:45 +0200)]
container: Don't store the resize clock

Use gtk_widget_get_frame_clock() instead

7 years agoMerge branch 'gitlab-ci-mingw' into 'master'
Benjamin Otte [Tue, 10 Apr 2018 18:59:49 +0000 (18:59 +0000)]
Merge branch 'gitlab-ci-mingw' into 'master'

gitlab-ci: mingw build

See merge request GNOME/gtk!105

7 years agogitlab-ci: Add a 32bit mingw build
Christoph Reiter [Fri, 6 Apr 2018 16:15:38 +0000 (18:15 +0200)]
gitlab-ci: Add a 32bit mingw build

7 years agoTerminate strncpy() buffers correctly
Emmanuele Bassi [Tue, 10 Apr 2018 13:51:27 +0000 (14:51 +0100)]
Terminate strncpy() buffers correctly

When using strncpy() with a buffer we need to account for the
terminating NUL character. GCC 8 started warning when using PPD_MAX_NAME
as the buffer length for strncpy() because the buffer we're copying into
has the same length — which means that the terminating NUL may be
skipped if the source string has a length of PPD_MAX_NAME.

The appropriate way to handle the case where we're copying a source with
a length bigger than of PPD_MAX_NAME is, as reported in the strncpy()
documentation, to copy `PPD_MAX_NAME - 1` bytes, and explicitly NUL
terminate the destination buffer. This has the additional benefit of
avoiding the compiler warning.

7 years agowayland: Factor out frame timings request code
Benjamin Otte [Tue, 10 Apr 2018 13:10:56 +0000 (15:10 +0200)]
wayland: Factor out frame timings request code

Also call the code everywhere we draw and not just with Cairo.

7 years agofilechooserbutton: Fix reserved pointers
Benjamin Otte [Tue, 10 Apr 2018 12:22:16 +0000 (14:22 +0200)]
filechooserbutton: Fix reserved pointers

So gcc stops complaining about unnecessary parenthesis.

7 years agoffmpeg: Fix compile warnings for newest version
Benjamin Otte [Tue, 10 Apr 2018 12:21:50 +0000 (14:21 +0200)]
ffmpeg: Fix compile warnings for newest version

7 years agovulkancontext: Add new error enum
Timm Bäder [Tue, 10 Apr 2018 07:53:48 +0000 (09:53 +0200)]
vulkancontext: Add new error enum

7 years agowidgetfocus: Use gtk_widget_compute_bounds
Timm Bäder [Sun, 8 Apr 2018 09:35:39 +0000 (11:35 +0200)]
widgetfocus: Use gtk_widget_compute_bounds

Instead of gtk_widget_get_allocation.

7 years agowidget: Remove _get_own_allocation
Timm Bäder [Sat, 7 Apr 2018 11:37:24 +0000 (13:37 +0200)]
widget: Remove _get_own_allocation

Replace all usages of it with _compute_bounds

7 years agowidget: Remove gtk_widget_get_own_allocation
Timm Bäder [Sat, 7 Apr 2018 08:13:36 +0000 (10:13 +0200)]
widget: Remove gtk_widget_get_own_allocation

Use compute_bounds everywhere.

7 years agowidget: Remove get_own_allocation usages
Timm Bäder [Sat, 7 Apr 2018 08:10:57 +0000 (10:10 +0200)]
widget: Remove get_own_allocation usages

7 years agonotebook: Use compute_bounds
Timm Bäder [Sat, 7 Apr 2018 08:02:02 +0000 (10:02 +0200)]
notebook: Use compute_bounds

7 years agopopover: Use gtk_widget_compute_bounds
Timm Bäder [Sat, 7 Apr 2018 07:29:17 +0000 (09:29 +0200)]
popover: Use gtk_widget_compute_bounds

Instead of the private get_own_allocation

7 years agotoolbar: Avoid a get_own_allocation call
Timm Bäder [Sat, 7 Apr 2018 07:26:31 +0000 (09:26 +0200)]
toolbar: Avoid a get_own_allocation call

We want the content allocation here since we are allocation child
widgets.

7 years agowidget: Fix typo in compute_bounds docs
Timm Bäder [Sat, 7 Apr 2018 07:26:12 +0000 (09:26 +0200)]
widget: Fix typo in compute_bounds docs

7 years agogdk: Protect against negative GDK_SCALE values
Timm Bäder [Sat, 7 Apr 2018 08:05:38 +0000 (10:05 +0200)]
gdk: Protect against negative GDK_SCALE values

Using those should not happen.

7 years agoGDK W32: use clock after_paint signal for timing updates
Руслан Ижбулатов [Mon, 9 Apr 2018 20:16:23 +0000 (20:16 +0000)]
GDK W32: use clock after_paint signal for timing updates

* Previous commit had misleading info. The code was
added to begin_paint() instead of end_paint(). Though
that did not affect its performance in any visible way.
* Company advised to move the code to an "after_paint" signal
handler, so that it works on all renderers, not just Cairo.
This change caused high fluctuation in FPS values in fishbowl
when it is put in a situation where it cannot achieve 60fps
(such as using Cairo renderer at ultra-high resolution).
This seems to be deliberate and not a bug.

7 years agodocs: Link to GResource
Emmanuele Bassi [Mon, 9 Apr 2018 19:10:47 +0000 (20:10 +0100)]
docs: Link to GResource

Since we're referring to GLib's functionality, might as well save some
time to the reader, and link to the GResource API reference page.

7 years agodocs/reference/gtk/getting_started: cgit => GitLab
Daniel Boles [Mon, 9 Apr 2018 19:55:14 +0000 (20:55 +0100)]
docs/reference/gtk/getting_started: cgit => GitLab

master version of b685eb177932c021975a4b337e37d5911c537de0

7 years agoGDK W32: set update frequency and timestamp
Руслан Ижбулатов [Mon, 9 Apr 2018 19:07:10 +0000 (19:07 +0000)]
GDK W32: set update frequency and timestamp

There is no easily apparent way of being notified when frame updates
happene exactly, so we just query frame info at the end of each paint.
If we query too often (faster than DWM refresh rate), we just get
the same values twice in a row, but that is, hopefully, highly unlikely.

7 years agoAccelGroup: Remove @See_also of deleted function
Daniel Boles [Mon, 9 Apr 2018 18:43:45 +0000 (19:43 +0100)]
AccelGroup: Remove @See_also of deleted function

gtk_item_factory_new() is not a thing that exists.

Also, maybe the lack of space after the colon was what stopped the link
from rendering.

7 years agocss: Clipping changes don't need a queue_allocate() anymore
Benjamin Otte [Mon, 9 Apr 2018 18:19:17 +0000 (20:19 +0200)]
css: Clipping changes don't need a queue_allocate() anymore

Now that queue_draw() isn't restricted to clip anymore, we don't need to
care about clip in the CSS engine either.

We do keep GTK_CSS_AFFECTS_CLIP around though because GtkWindow does
care for the window's size.

7 years agoentry: Stop being activatable
Benjamin Otte [Mon, 9 Apr 2018 12:45:04 +0000 (14:45 +0200)]
entry: Stop being activatable

Activating entries does not do anything.

Activate the default widget instead.

7 years agoMerge branch 'master' into 'master'
Daniel Boles [Mon, 9 Apr 2018 17:25:08 +0000 (17:25 +0000)]
Merge branch 'master' into 'master'

gdk_x11_display_get_monitor: fix monitor number test logic

See merge request GNOME/gtk!107

7 years agogdk_x11_display_get_monitor: fix monitor number test logic
Sébastien Villemot [Mon, 9 Apr 2018 13:36:36 +0000 (15:36 +0200)]
gdk_x11_display_get_monitor: fix monitor number test logic

When asked for a nonexistent (positive) monitor number,
gdk_x11_display_get_monitor would (at best) return an uninitialized pointer,
instead of returning NULL.

8 years agoglcontext: Store the buffer age regions in the GL context
Benjamin Otte [Sun, 8 Apr 2018 22:58:31 +0000 (00:58 +0200)]
glcontext: Store the buffer age regions in the GL context

That way, we can store the right region there: The actual painted area
instead of the exposed area (which is way too small).

Also, the GL context is the only user of this data, so storing it there
seems way smarter.

8 years agovulkan: Use new resize vfunc to recreate swapchain
Benjamin Otte [Sun, 8 Apr 2018 22:40:47 +0000 (00:40 +0200)]
vulkan: Use new resize vfunc to recreate swapchain

... instead of checking sizes for every frame.

8 years agodrawcontext: Add a surface_resized() vfunc
Benjamin Otte [Sun, 8 Apr 2018 22:35:32 +0000 (00:35 +0200)]
drawcontext: Add a surface_resized() vfunc

Call this vfunc whenever the surface's size has changed.

8 years agosurface: Track all draw contexts created for the surface
Benjamin Otte [Sun, 8 Apr 2018 22:25:03 +0000 (00:25 +0200)]
surface: Track all draw contexts created for the surface

8 years agowidget: Don't do a 0-size check before snapshotting
Benjamin Otte [Sun, 8 Apr 2018 18:09:45 +0000 (20:09 +0200)]
widget: Don't do a 0-size check before snapshotting

Even widgets with an empty allocation may still want to draw stuff.
Examples include shadows or child widgets with negative margins.

Fixes GtkEntry's progressbar not showing up anymore.

8 years agotestmodelbutton: Test :centered, :icon, :inverted
Daniel Boles [Sun, 8 Apr 2018 17:39:59 +0000 (18:39 +0100)]
testmodelbutton: Test :centered, :icon, :inverted

Test more stuff.

8 years agotestmodelbutton: Fix wrongly overridding MB child
Daniel Boles [Sun, 8 Apr 2018 17:31:03 +0000 (18:31 +0100)]
testmodelbutton: Fix wrongly overridding MB child

I was setting a GtkButton:label, which resulted in the ModelButton's own
custom children getting lost. That doesn't make for a useful test...

8 years agoModelButton: Use WARN_INVALID_PROPERTY, not assert
Daniel Boles [Sun, 8 Apr 2018 17:13:33 +0000 (18:13 +0100)]
ModelButton: Use WARN_INVALID_PROPERTY, not assert

Do the same thing we do everywhere else for invalid properties.

8 years agoModelButton: Fix type Wether => Whether
Daniel Boles [Sun, 8 Apr 2018 16:08:11 +0000 (17:08 +0100)]
ModelButton: Fix type Wether => Whether

8 years agotestmodelbutton: Add explanatory comments to CSS
Daniel Boles [Sun, 8 Apr 2018 15:07:35 +0000 (16:07 +0100)]
testmodelbutton: Add explanatory comments to CSS

and load at an earlier, more sensible place, before creating any widgets

8 years agoModelButton: Protect against nonsensical gbooleans
Daniel Boles [Sun, 8 Apr 2018 11:43:07 +0000 (12:43 +0100)]
ModelButton: Protect against nonsensical gbooleans

the same way we do normally.

8 years agotests/testmodelbutton: Add this
Daniel Boles [Sun, 8 Apr 2018 12:07:38 +0000 (13:07 +0100)]
tests/testmodelbutton: Add this

and test whether :action-name, :role, and CSS nodes work as expected

https://gitlab.gnome.org/GNOME/gtk/issues/163

8 years agoMerge branch 'wip/sadiq/fixes' into 'master'
Timm Bäder [Sun, 8 Apr 2018 07:30:24 +0000 (07:30 +0000)]
Merge branch 'wip/sadiq/fixes' into 'master'

listbox: Fix signal name is documentation

See merge request GNOME/gtk!106

8 years agolistbox: Fix signal name in documentation
Mohammed Sadiq [Sun, 8 Apr 2018 05:07:31 +0000 (10:37 +0530)]
listbox: Fix signal name in documentation

8 years agoFix some g-i annotation warnings
Rico Tzschichholz [Fri, 6 Apr 2018 14:20:48 +0000 (16:20 +0200)]
Fix some g-i annotation warnings

8 years agomenu: Avoid an invalid read
Timm Bäder [Thu, 5 Apr 2018 18:47:25 +0000 (20:47 +0200)]
menu: Avoid an invalid read

8 years agolockbutton: Remove priv pointer
Timm Bäder [Sat, 31 Mar 2018 15:30:03 +0000 (17:30 +0200)]
lockbutton: Remove priv pointer

8 years agowidgetbowl: Add switch demo
Timm Bäder [Sat, 31 Mar 2018 12:54:14 +0000 (14:54 +0200)]
widgetbowl: Add switch demo

8 years agogtk-demo: Redo viewing of resources
Benjamin Otte [Thu, 5 Apr 2018 22:42:17 +0000 (00:42 +0200)]
gtk-demo: Redo viewing of resources

1. Don't rely on GtkImage as a detector of file type anymore.
   Instead, hardcode all extensions that are in use.
2. Add a display method for videos.

8 years agovideo: Add autoplay and loop boolean properties
Benjamin Otte [Thu, 5 Apr 2018 22:41:44 +0000 (00:41 +0200)]
video: Add autoplay and loop boolean properties

8 years agoUpdate POTFILES.in
Piotr Drąg [Thu, 5 Apr 2018 20:54:03 +0000 (22:54 +0200)]
Update POTFILES.in

8 years agogtkmenushell: Port to using GtkEventControllerKey
Carlos Garnacho [Fri, 23 Mar 2018 17:24:58 +0000 (18:24 +0100)]
gtkmenushell: Port to using GtkEventControllerKey

8 years agogtkcellrendereraccel: Port to using GtkEventControllerKey
Carlos Garnacho [Fri, 23 Mar 2018 15:46:40 +0000 (16:46 +0100)]
gtkcellrendereraccel: Port to using GtkEventControllerKey

8 years agogtkentry: Use key controller to track focus changes
Carlos Garnacho [Fri, 23 Mar 2018 15:22:05 +0000 (16:22 +0100)]
gtkentry: Use key controller to track focus changes

8 years agogtkcalendar: Use key controller to track focus changes
Carlos Garnacho [Fri, 23 Mar 2018 15:09:37 +0000 (16:09 +0100)]
gtkcalendar: Use key controller to track focus changes

8 years agogtktextview: Use key controller for focus changes
Carlos Garnacho [Fri, 23 Mar 2018 15:02:44 +0000 (16:02 +0100)]
gtktextview: Use key controller for focus changes

8 years agogtkeventcontrollerkey: Add ::focus-in/out signals
Carlos Garnacho [Thu, 22 Mar 2018 17:32:19 +0000 (18:32 +0100)]
gtkeventcontrollerkey: Add ::focus-in/out signals

And handle GDK_FOCUS_CHANGE events in order to emit those.

8 years agogtkeventcontrollerkey: Add get_group() call
Carlos Garnacho [Thu, 22 Mar 2018 16:54:52 +0000 (17:54 +0100)]
gtkeventcontrollerkey: Add get_group() call

Callers can use this function on a key-pressed/released signal
to find out the key event group, useful in a few places.

8 years agogtkmenu: Stop using ::key-press-event
Carlos Garnacho [Sun, 11 Mar 2018 12:56:32 +0000 (13:56 +0100)]
gtkmenu: Stop using ::key-press-event

Use GtkEventControllerKey for the task

8 years agogtkiconview: Stop using ::key-press-event
Carlos Garnacho [Sun, 11 Mar 2018 12:56:21 +0000 (13:56 +0100)]
gtkiconview: Stop using ::key-press-event

Use GtkEventControllerKey for the task

8 years agogtkcellrendererspin: Stop using ::key-press-event
Carlos Garnacho [Sun, 11 Mar 2018 12:56:02 +0000 (13:56 +0100)]
gtkcellrendererspin: Stop using ::key-press-event

Use GtkEventControllerKey for the task

8 years agoappchoooserdialog: use search bar key capture API
Carlos Garnacho [Sun, 11 Mar 2018 12:55:45 +0000 (13:55 +0100)]
appchoooserdialog: use search bar key capture API

8 years agoinspector: Use search bar API to capture key events from the toplevel
Carlos Garnacho [Sun, 11 Mar 2018 12:54:54 +0000 (13:54 +0100)]
inspector: Use search bar API to capture key events from the toplevel

8 years agogtksearchbar/entry: Add [gs]et_key_capture_widget() API calls
Carlos Garnacho [Sun, 11 Mar 2018 12:53:17 +0000 (13:53 +0100)]
gtksearchbar/entry: Add [gs]et_key_capture_widget() API calls

This lets these widgets actively pull events from a widget, instead
of passively being fed events.

8 years agogtkwindow: Perform key activation in gtk_main_do_event()
Carlos Garnacho [Sun, 11 Mar 2018 12:47:11 +0000 (13:47 +0100)]
gtkwindow: Perform key activation in gtk_main_do_event()

In a similar spirit to the previous commit, make window shortcut
activation happen by default on toplevels, without relying on
legacy controllers.

8 years agogtkwidget: Activate key bindings through run_controllers()
Carlos Garnacho [Sun, 11 Mar 2018 12:44:37 +0000 (13:44 +0100)]
gtkwidget: Activate key bindings through run_controllers()

Deferring a bit further making those a standalone controller, make
binding activation happen on run_controllers(), so it happens by
default on widgets (unless the key event was consumed earlier)
without the need of a legacy event controller.

8 years agogtkwidget: Break early if non-gesture controllers handle the event
Carlos Garnacho [Sun, 11 Mar 2018 12:41:10 +0000 (13:41 +0100)]
gtkwidget: Break early if non-gesture controllers handle the event

Non gesture controllers have no means to collaborate with other
controllers, thus should be considered standalone entities. It makes
no sense to propagate any further if scroll/key controllers handled
the event.

8 years agoeventcontrollerkey: Add function to forward stuff elsewhere
Carlos Garnacho [Sun, 11 Mar 2018 12:38:19 +0000 (13:38 +0100)]
eventcontrollerkey: Add function to forward stuff elsewhere

8 years agogtkmain: Don't use special paths for key event propagation
Carlos Garnacho [Wed, 7 Mar 2018 16:59:22 +0000 (17:59 +0100)]
gtkmain: Don't use special paths for key event propagation

Set the event_widget to the window focus, and let event capture/bubble
handling do the rest.

8 years agogtkrange: Stop using ::key-press-event
Carlos Garnacho [Wed, 7 Mar 2018 16:58:32 +0000 (17:58 +0100)]
gtkrange: Stop using ::key-press-event

Use GtkEventControllerKey for the task

8 years agogtkcellrendereraccel: simplify grabbing code
Carlos Garnacho [Wed, 7 Mar 2018 13:27:27 +0000 (14:27 +0100)]
gtkcellrendereraccel: simplify grabbing code

8 years agocombo box: Stop using ::key-press-event
Matthias Clasen [Thu, 8 Feb 2018 00:36:48 +0000 (19:36 -0500)]
combo box: Stop using ::key-press-event

Switch to using ::event.

8 years agoapp chooser: Stop using ::key-press-event
Matthias Clasen [Wed, 7 Feb 2018 21:31:59 +0000 (16:31 -0500)]
app chooser: Stop using ::key-press-event

For now, just switch to using ::event.

8 years agogtkentrycompletion: Stop using ::key-press-event
Carlos Garnacho [Tue, 6 Mar 2018 16:53:53 +0000 (17:53 +0100)]
gtkentrycompletion: Stop using ::key-press-event

Use GtkEventControllerKey for the task

8 years agogtkplacessidebar: Stop using ::key-press-event
Carlos Garnacho [Mon, 5 Mar 2018 17:50:35 +0000 (18:50 +0100)]
gtkplacessidebar: Stop using ::key-press-event

Use GtkEventControllerKey for the task

8 years agogtktextview: Stop using ::key-press-event
Carlos Garnacho [Mon, 5 Mar 2018 14:00:16 +0000 (15:00 +0100)]
gtktextview: Stop using ::key-press-event

Use GtkEventControllerKey for the task

8 years agogtkflowbox: Stop using ::key-press-event
Carlos Garnacho [Mon, 5 Mar 2018 14:00:06 +0000 (15:00 +0100)]
gtkflowbox: Stop using ::key-press-event

Use GtkEventControllerKey for the task

8 years agogtkentry: Stop using ::key-press-event
Carlos Garnacho [Mon, 5 Mar 2018 13:59:33 +0000 (14:59 +0100)]
gtkentry: Stop using ::key-press-event

Use GtkEventControllerKey for the task

8 years agogtkcolorswatch: Stop using ::key-press-event
Carlos Garnacho [Mon, 5 Mar 2018 13:59:21 +0000 (14:59 +0100)]
gtkcolorswatch: Stop using ::key-press-event

Use GtkEventControllerKey for the task

8 years agogtkcolorplane: Stop using ::key-press-event
Carlos Garnacho [Mon, 5 Mar 2018 13:59:07 +0000 (14:59 +0100)]
gtkcolorplane: Stop using ::key-press-event

Use GtkEventControllerKey for the task

8 years agogtkcalendar: Stop using ::key-press-event
Carlos Garnacho [Mon, 5 Mar 2018 13:58:57 +0000 (14:58 +0100)]
gtkcalendar: Stop using ::key-press-event

Use GtkEventControllerKey for the task

8 years agosearch bar: Stop using ::key-press-event
Matthias Clasen [Thu, 8 Feb 2018 00:54:11 +0000 (19:54 -0500)]
search bar: Stop using ::key-press-event

Use a key event controller instead.

8 years agoShortcuts window: stop using ::key-press-event
Matthias Clasen [Thu, 8 Feb 2018 00:42:47 +0000 (19:42 -0500)]
Shortcuts window: stop using ::key-press-event

Use a key event controller instead.

8 years agocolor editor: Stop using ::key-press-event
Matthias Clasen [Thu, 8 Feb 2018 00:27:16 +0000 (19:27 -0500)]
color editor: Stop using ::key-press-event

Use key event controllers instead.

8 years agoabout dialog: Stop using ::key-press-event
Matthias Clasen [Thu, 8 Feb 2018 00:17:11 +0000 (19:17 -0500)]
about dialog: Stop using ::key-press-event

Use a key event controller instead.

8 years agoicon-browser: Stop using ::key-press-event
Matthias Clasen [Sun, 4 Feb 2018 21:21:37 +0000 (22:21 +0100)]
icon-browser: Stop using ::key-press-event

8 years agoplaces view: Stop using ::key-press-event
Matthias Clasen [Sun, 4 Feb 2018 20:21:39 +0000 (21:21 +0100)]
places view: Stop using ::key-press-event

8 years agoinspector: Stop using ::key-press-event
Matthias Clasen [Sun, 4 Feb 2018 08:29:44 +0000 (09:29 +0100)]
inspector: Stop using ::key-press-event

8 years agotestgtk: Drop snapshot
Matthias Clasen [Sat, 3 Feb 2018 12:01:47 +0000 (13:01 +0100)]
testgtk: Drop snapshot

This needs to be redone with modern snapshotting infrastructure.
Lets drop it for now, it is somewhat duplicative with inspector
features.

8 years agotestgtk: Drop the event watcher
Matthias Clasen [Sat, 3 Feb 2018 11:58:23 +0000 (12:58 +0100)]
testgtk: Drop the event watcher

This is not a very useful test, and it is hard to keep working
in an event controller world.

8 years agodocs: Modernize an example
Matthias Clasen [Sat, 3 Feb 2018 10:41:33 +0000 (11:41 +0100)]
docs: Modernize an example

The signals that are showcased here are going away.

8 years agogtk-demo: Stop using ::key-press-event in font explorer
Matthias Clasen [Wed, 31 Jan 2018 11:42:43 +0000 (12:42 +0100)]
gtk-demo: Stop using ::key-press-event in font explorer

Use a key controller instead. Note that this currently
breaks the handling of Enter, since we activate key bindings
twice, causing us to switch to the label and back.

8 years agotestsuite: Don't use ::key-press-event
Matthias Clasen [Wed, 31 Jan 2018 11:35:05 +0000 (12:35 +0100)]
testsuite: Don't use ::key-press-event

We don't need it here.

8 years agofile chooser: Use a key event controller
Matthias Clasen [Thu, 25 Jan 2018 07:27:43 +0000 (08:27 +0100)]
file chooser: Use a key event controller

We want to get rid of ::key-press-event.

8 years agodemos: Add "Paint" demo
Carlos Garnacho [Fri, 2 Feb 2018 15:04:17 +0000 (16:04 +0100)]
demos: Add "Paint" demo

8 years agogtk: Add GtkGestureStylus
Carlos Garnacho [Thu, 1 Feb 2018 16:52:40 +0000 (17:52 +0100)]
gtk: Add GtkGestureStylus

This is a GtkGesture done to deal with stylus events from drawing tablets.
Those have a special number of characteristics that extend a regular
pointer, so it makes sense to wrap that.

8 years agogtkwindow: Unset focus grab_widget if it ends up unmapped
Carlos Garnacho [Mon, 29 Jan 2018 11:31:53 +0000 (12:31 +0100)]
gtkwindow: Unset focus grab_widget if it ends up unmapped

This may result on the later emission of crossing events, with one of the
sides being already unmapped/unrealized. The widget being unmapped will
result on repick and emission of a set of crossing events anyway.

8 years agogtk: Add GtkEventControllerKey
Carlos Garnacho [Mon, 11 Dec 2017 18:21:38 +0000 (19:21 +0100)]
gtk: Add GtkEventControllerKey

This event controller is meant to replace usage from key-press/release-event
handlers all through. Optionally it can be set a GtkIMContext, so interaction
is carried by the controller.

8 years agosnapshot: Don't cause invalid reads
Benjamin Otte [Thu, 5 Apr 2018 16:18:55 +0000 (18:18 +0200)]
snapshot: Don't cause invalid reads

1. Pass clip rectangles to gtk_snapshot_push_state() that point into
   the state array.
2. g_array_set_size(len+1) the state array
3. Make that function realloc() the state array.
4. The clip rectangle now points into invalid memory
5. Use the clip array

This patch fixes things by moving step 5 to before step 2.

8 years agorendernode: Add missing return
Benjamin Otte [Thu, 5 Apr 2018 15:32:57 +0000 (17:32 +0200)]
rendernode: Add missing return

Don't to extra work when not needed.